<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--CDN引入方式-->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    <h1>{{msg}}</h1>
    <h1 v-if="num >= 90">优秀</h1>
    <h1 v-else-if="num >= 80 && num < 90">良好</h1>
    <h1 v-else-if="num >= 60 && num < 80">及格</h1>
    <h1 v-else>不及格</h1>
</div>

</body>

<script type="application/javascript">
    // 创建Vue对象
    var vm = new Vue({
        el: "#app",
        data: {
            msg: "Hello Vue!",
            num: Math.random() * 100
        }
    });
</script>

</html>